import React, { Component } from "react";
import Child from "./Child";

class App extends Component {
  state = {
    num: 10,
  };
  render() {
    return (
      <>
        <h3>新版生命周期</h3>
        <Child num={this.state.num} />
      </>
    );
  }
  // componentDidMount() {
  //   setTimeout(() => {
  //     this.setState({
  //       num: 20,
  //     });
  //   }, 3000);
  // }
}

export default App;
